package com.aaa.javaweb.dao.impl;

import com.aaa.javaweb.dao.ZhuCeDao;
import com.aaa.javaweb.entity.Zhuce;
import com.aaa.javaweb.until.JDBCUntil;
import org.springframework.stereotype.Controller;

import java.util.List;
import java.util.Map;

@Controller
public class ZhuCeDaoImpl implements ZhuCeDao {
    @Override
    public int insertadd(Zhuce zhuce) {
        String sql="insert into t_user (name,pwd,idcard) values(?,?,?)";
        return JDBCUntil.Updateout(sql,zhuce.getName(),zhuce.getPassword(),zhuce.getIdcard());
    }

    @Override
    public List<Map> selectzc(Zhuce zhuce) {
        String sql="select * from t_user where name=? and pwd=?";
        return JDBCUntil.selectMap(sql,zhuce.getName(),zhuce.getPassword());
    }

}
